package com.lanou.test.service;

import com.lanou.test.bean.User;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMapping;

@Service
public class NewsService {


    public int findALLnews(){
       this.findUser();
       return 0;
    }
    @Cacheable(value = "User",key = "#methodName")
    public User findUser(){
        System.out.println("内容创建中");
        User user = new User();
        user.setUsername("dsd");
        user.setPwd("fdd");
        user.setId(4);
        return user;
    }
}
